# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-bencode
pkgname=('python2-bencode' 'python-bencode')
pkgver=1.0
pkgrel=11
pkgdesc='The BitTorrent bencode module as light-weight, standalone package.'
arch=('any')
url='https://pypi.python.org/pypi/bencode/'
license=('Bittorent')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://pypi.python.org/packages/ee/e8/a525446e3868f820f7f94787ca9277cc7ed005923672a986e6448fb04f1f/bencode-$pkgver.tar.gz")
sha512sums=('873bc7da16729a49033709f0663ef6d58076d0c5e1b31624e72a3eb35af7fa52af7ed42407b68995387ea9d6e2c009836f764c6a45b4e3b905d962110cf01ee8')

package_python2-bencode() {
  depends=('python2')
  conflicts=('python2-bencode.py')
  cd "bencode-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}

package_python-bencode() {
  depends=('python')
  conflicts=('python-bencode.py')

  cd "bencode-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}

